package com.laiketui.plugin.common.mapper;

import com.laiketui.core.exception.LaiKeAPIException;
import com.laiketui.plugin.common.domain.base.flashsale.FlashsaleActivityModel;
import com.laiketui.plugin.common.tool.db.BaseMapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface FlashsaleActivityModelMapper extends BaseMapper<FlashsaleActivityModel> {
    @Override
    List<Map<String, Object>> selectDynamic(Map<String, Object> map) throws LaiKeAPIException;

    @Override
    int countDynamic(Map<String, Object> map) throws LaiKeAPIException;

    /**
     * 删除活动
     * @param storeId
     * @param LabelId
     * @return
     */
    @Update("update lkt_flashsale_activity set is_delete = 1 where store_id = #{storeId} and label_id = #{LabelId}")
    int deleteByLabelId(Integer storeId, Integer LabelId);

}
